import request from '../utils/request'
//查询作家是否已注册过
export function getAuthorStatus() {
    return request.get('/author/status');
}
//作家注册
export function register(params) {
    return request.post('/author/register', params);
}

export function listBooks(params) {
    return request.get('/author/books', { params });
}

export function publishBook(params) {
    return request.post('/author/book', params);
}

export function publishChapter(bookId,params) {
    return request.post(`/author/chapter/${bookId}`, params);
}

export function listChapters(bookId, params) {
    return request.get(`/author/chapters/${bookId}`, params);
}
